﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.Windows.Data;

namespace ESC.Designer.Resources
{
    class ProductionStateConvert : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            if (value.ToString() == "0")
            {
                return "等待作業";
            }
            else if (value.ToString() == "1")
            {
                return "正在作業";
            }
            else if (value.ToString() == "8")
            {
               return "QA取樣中";
            }
            else if (value.ToString() == "9")
            {
                return "扣留中";
            }
            else if (value.ToString() == "7")
            {
                return "暫存中";
            }
            else if (value.ToString() == "6")
            {
                return "送驗單待印";
            }
            else
            {
                return "作業完成";
            }
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
